/***************************************************************************
 * 
 * Copyright (c) 2015 Baidu.com, Inc. All Rights Reserved
 * $Id$ 
 * 
 **************************************************************************/
 
 /**
 * @file main.cpp
 * @author liutongren(liutongren@baidu.com)
 * @date 2015/06/15 21:23:06
 * @version $Revision$ 
 * @brief 
 *  
 **/
#include <iostream>
#include <string>
#include <stdio.h>
using namespace std;

class Solution {
public:
    string countAndSay(int n) {
        
        for (int i = 0; i != n; ++i) {
            char *input_buffer;
            if (i == 0) {
                input_buffer = new char(1);
            }  
        
        }
        string result_str(result);
        //cout << "result" << result_str << endl;
        return result_str;
    }
    bool single_count(const char input_list[], char output_list[]) {
        //char buffer[64];
        //sprintf(buffer, "%d", n);
        int result_len = strlen(input_list);
        if (result_len > 0) {
            char tem = buffer[0];
            int tem_number = 1;
            //char result[128] = {'\0'};
            int result_index = 0;
            for (int i = 1; i != result_len; ++i) {
                if (buffer[i] == tem) {
                    ++tem_number; 
                } else {
                    output_list[result_index++] = tem_number + '0';
                    output_list[result_index++] = tem;
                    tem = buffer[i];
                    tem_number = 1;
                }
            }
            output_list[result_index++] = tem_number + '0';
            output_list[result_index++] = tem;
            output_list[result_index++] = '\0';
        }
    }
};

int main(int argc, char *argv[]) {
    char buffer[64];
    //sprintf_s(buffer, 64, "%d", 123854656756);
    sprintf(buffer, "%d", 123854656);
    int len = strlen(buffer);
    printf("content:%s\tlen:%d", buffer, len);
    Solution solu;
    cout << solu.countAndSay(123854656) << endl;
    return 0;
}

/* vim: set ts=4 sw=4 sts=4 tw=100 */
